package com.jiawa.train.business.service;

import com.jiawa.train.business.domain.DailyTrain;
import com.jiawa.train.business.domain.DailyTrainTicket;
import com.jiawa.train.business.req.DailyTrainTicketQueryReq;
import com.jiawa.train.business.req.DailyTrainTicketSaveReq;
import com.jiawa.train.business.resp.DailyTrainTicketQueryResp;
import com.jiawa.train.common.resp.PageResp;

import java.util.Date;

/**
 * @author zzl
 * @version 1.0
 */
public interface DailyTrainTicketService {
    void save(DailyTrainTicketSaveReq req);

    /**
     * 分页查询每日高铁车票数据
     * @param req
     * @return
     */
    PageResp<DailyTrainTicketQueryResp> queryList(DailyTrainTicketQueryReq req);
    PageResp<DailyTrainTicketQueryResp> queryList2(DailyTrainTicketQueryReq req);

    void delete(Long id);

    /**
     * 根据日期和每日高铁车次生成车票数据
     * @param date
     * @param dailyTrain
     */
    void genDailyTrainTicket(Date date, DailyTrain dailyTrain);

    /**
     * 根据唯一键(日期、车次、始发站、终点站)查询车票
     * @param date
     * @param trainCode
     * @param start
     * @param end
     * @return
     */
    DailyTrainTicket selectByUnique(Date date, String trainCode, String start, String end);
}